class Child extends React.Component {
  constructor(props){
    super(props);
  }
  render() {
    return (
      <input value={this.props.value} onChange={this.props.trigger} />
    )
  }
}

class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      value : 0 
    }
    this.handleChange = this.handleChange.bind(this);
  }
  handleChange(e){
    this.setState({
      value: e.target.value
    })
  }
  render() {
    return (
      <div>
        <h1>App: {this.state.value} </h1>
        <Child value={this.state.value} trigger={this.handleChange} />
        <Child value={this.state.value} trigger={this.handleChange} />
      </div>
    );
  }
}
ReactDOM.render(
  <App />,
  document.getElementById('root')
);